package com.ihr360.job.core.item;

import com.ihr360.job.core.entity.StepContribution;
import com.ihr360.job.core.scope.context.SimpleStepContext;

/**
 * Interface for providing {@link Chunk}s to be processed, used by the
 * {@link ChunkOrientedTasklet}
 *
 * @since 2.0
 * @see ChunkOrientedTasklet
 */
public interface ChunkProvider<T> {

    Chunk<T> provide(StepContribution contribution,SimpleStepContext simpleStepContext) throws Exception;

    void postProcess(StepContribution contribution, Chunk<T> chunk);

}
